home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / m17n / si-wijesekera-preedit.mim < prev    next >
Text File  |  2009-04-29  |  6KB  |  260 lines

  1. ;; si-wijesekera-preedit.mim -- Sinhala input method with wijesekera method
  2. ;; Copyright (C) 2006, 2007
  3. ;;   National Institute of Advanced Industrial Science and Technology (AIST)
  4. ;;   Registration Number H15PRO112
  5.  
  6. ;; This file is part of the m17n database; a sub-part of the m17n
  7. ;; library.
  8.  
  9. ;; The m17n library is free software; you can redistribute it and/or
  10. ;; modify it under the terms of the GNU Lesser General Public License
  11. ;; as published by the Free Software Foundation; either version 2.1 of
  12. ;; the License, or (at your option) any later version.
  13.  
  14. ;; The m17n library is distributed in the hope that it will be useful,
  15. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. ;; Lesser General Public License for more details.
  18.  
  19. ;; You should have received a copy of the GNU Lesser General Public
  20. ;; License along with the m17n library; if not, write to the Free
  21. ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22. ;; Boston, MA 02110-1301, USA.
  23.  
  24. (input-method si wijesekera-preedit)
  25.  
  26. (description "Sinhala input method based on SLS 1134 Rev. 2:2004.
  27.   <http://www.fonts.lk/doc/sin-kbd-layout4.pdf>
  28. This input method uses preedit rather than surrounding text.
  29. ")
  30.  
  31. (title "α╖âα╖Æ")
  32.  
  33. (map
  34.  (independent
  35.   ("w" "α╢à")                ; 0D85
  36.   ("b" "α╢ë")                ; 0D89
  37.   ("B" "α╢è")                ; 0D8A
  38.   ("W" "α╢ï")                ; 0D8B
  39.   ("R" "α╢ì")                ; 0D8D
  40.   ((A-,) "α╢Å")                ; 0D8F
  41.   ("t" "α╢æ")                ; 0D91
  42.   ("T" "α╢ö")                ; 0D94
  43.   ("l" "α╢Ü")                ; 0D9A
  44.   ("L" "α╢¢")                ; 0D9B
  45.   ("." "α╢£")                ; 0D9C
  46.   (">" "α╢¥")                ; 0D9D
  47.   ("X" "α╢₧")                ; 0D9E
  48.   ((A-.) "α╢ƒ") ((0x2E A-z) "α╢ƒ")        ; 0D9F
  49.   ("p" "α╢á")                ; 0DA0
  50.   ("P" "α╢í")                ; 0DA1
  51.   ("c" "α╢ó")                ; 0DA2
  52.   ("C" "α╢ú")                ; 0DA3
  53.   ("\[" "α╢ñ")                ; 0DA4
  54.   ("{" "α╢Ñ")                ; 0DA5
  55.   ((A-c) "α╢ª") ((0x63 A-z) "α╢ª")        ; 0DA6
  56.   ("g" "α╢º")                ; 0DA7
  57.   ("G" "α╢¿")                ; 0DA8
  58.   ("v" "α╢⌐")                ; 0DA9
  59.   ("V" "α╢¬")                ; 0DAA
  60.   ("K" "α╢½")                ; 0DAB
  61.   ((A-v) "α╢¼") ((0x76 A-z) "α╢¼")        ; 0DAC
  62.   (";" "α╢¡")                ; 0DAD
  63.   (":" "α╢«")                ; 0DAE
  64.   ("o" "α╢»")                ; 0DAF
  65.   ("O" "α╢░")                ; 0DB0
  66.   ("k" "α╢▒")                ; 0DB1
  67.   ((A-o) "α╢│") ((0x6F A-z) "α╢│")        ; 0DB3
  68.   ("m" "α╢┤")                ; 0DB4
  69.   ("M" "α╢╡")                ; 0DB5
  70.   ("n" "α╢╢")                ; 0DB6
  71.   ("N" "α╢╖")                ; 0DB7
  72.   ("u" "α╢╕")                ; 0DB8
  73.   ("U" "α╢╣")                ; 0DB9
  74.   ("h" "α╢║")                ; 0DBA
  75.   ("r" "α╢╗")                ; 0DBB
  76.   ("," "α╢╜")                ; 0DBD
  77.   ("j" "α╖Ç")                ; 0DC0
  78.   ("Y" "α╖ü")                ; 0DC1
  79.   ("I" "α╖é")                ; 0DC2
  80.   ("i" "α╖â")                ; 0DC3
  81.   ("y" "α╖ä")                ; 0DC4
  82.   ("<" "α╖à")                ; 0DC5
  83.   ("F" "α╖å")                ; 0DC6
  84.   ((A-\') "α╖┤")                ; 0DF4
  85.  
  86.   ("J" "α╖àα╖ö")                ; muurdhaja lu (0DC5 0DD4)
  87.  
  88.   ((S-\ ) "┬á")                ; NBSP (00A0)
  89.   ((A-\ ) "ΓÇî")                ; ZWNJ (200C)
  90.  
  91.   ("\]" ";")
  92.   ("}" ":")
  93.   ("'" ".")
  94.   ("\"" ",")
  95.   ("z" "'")
  96.   ("Z" "\"")
  97.   )
  98.  
  99.  (dependent
  100.   ("x" "α╢é")                ; 0D82
  101.   ((A-x) "α╢â")                ; 0D83
  102.   ("a"
  103.    (cond
  104.     ((= @-1 0x0D91) (delete @-) "α╢Æ")    ; 0D92
  105.     ((= @-1 0x0D94) (delete @-) "α╢ò")    ; 0D95
  106.     ((= @-1 0x0DD9) (delete @-) "α╖Ü")    ; 0DDA
  107.     ((= @-1 0x0DDC) (delete @-) "α╖¥")    ; 0DDD
  108.     (1 "α╖è")))                ; 0DCA
  109.   ("d"
  110.    (cond
  111.     ((= @-1 0x0D85) (delete @-) "α╢å")    ; 0D86
  112.     ((= @-1 0x0DD9) (delete @-) "α╖£")    ; 0DDC
  113.     (1 "α╖Å")))                ; 0DCF
  114.   ("e"
  115.    (cond
  116.     ((= @-1 0x0D85) (delete @-) "α╢ç")    ; 0D87
  117.     (1 "α╖É")))                ; 0DD0
  118.   ("E"
  119.    (cond
  120.     ((= @-1 0x0D85) (delete @-) "α╢ê")    ; 0D88
  121.     ((& (= @-2 0x0DC5) (= @-1 0x0DD4))
  122.      (delete @-) "α╖û")            ; 0DD6
  123.     (1 "α╖æ")))                ; 0DD1
  124.   ("s" "α╖Æ")                ; 0DD2
  125.   ("S" "α╖ô")                ; 0DD3
  126.   ("q" "α╖ö")                ; 0DD4
  127.   ("Q" "α╖û")                ; 0DD6
  128.  
  129.   ("D"
  130.    (cond
  131.     ((= @-1 0x0D8D) (delete @-) "α╢Ä")    ; 0D8E
  132. ;; The following line does not work when no consonant proceeds.
  133. ;;    ((= @-1 0x0DD8) (delete @-) "α╖▓")    ; 0DF2
  134.     (1 "α╖ÿ")))                ; 0DD8
  135. ;; This one works with or without a preceeding consonant.
  136.   ("DD" "α╖▓")                 ; 0DF2
  137.  
  138.   ("A"
  139.    (cond
  140.     ((= @-1 0x0D8B) (delete @-) "α╢î")    ; 0D8C
  141.     ((= @-1 0x0D8F) (delete @-) "α╢É")    ; 0D90
  142.     ((= @-1 0x0D94) (delete @-) "α╢û")    ; 0D96
  143.     ((= @-1 0x0DD9) (delete @-) "α╖₧")    ; 0DDE
  144.     (1 "α╖ƒ")))                ; 0DDF
  145.   ((A-a) "α╖│")                ; 0DF3
  146.  
  147.   ("H"                    ; yansaya (0DCA 200D 0DBA)
  148.    (cond
  149.     ((| (= @-1 0x0DD9) (= @-1 0x0DDB))
  150.      (move @-) "α╖èΓÇìα╢║" (move @>))
  151.     (1
  152.      "α╖èΓÇìα╢║")))
  153.  
  154.   ("`"                    ; rakaransaya (0DCA 200D 0DBB)
  155.    (cond
  156.     ((| (= @-1 0x0DD2) (= @-1 0x0DD3) (= @-1 0x0DD9) (= @-1 0x0DDB))
  157.      (move @-) "α╖èΓÇìα╢╗" (move @>))
  158.     (1 "α╖èΓÇìα╢╗")))
  159.  
  160.   ("~"                    ; repaya (0DBB 0DCA 200D)
  161.    (move @<)
  162.    "α╢╗α╖èΓÇì"
  163.    (move @>))
  164.   )
  165.  
  166.  (kombuva
  167.   ("f" "α╖Ö"))                ; 0DD9
  168.  
  169.  (join
  170.   ("\\"))
  171.  
  172.  (backspace
  173.   ((BackSpace)))
  174.  )
  175.  
  176. (state
  177.  (init-state
  178.   (independent
  179.    (shift independent-state))
  180.   (kombuva
  181.    (shift kombuva-state))
  182.   (dependent))
  183.  
  184.  (independent-state
  185.   (dependent)
  186.   (join
  187.    (cond
  188.     ((| (= @-1 0x0DD9) (= @-1 0x0DDB))
  189.      (shift join-state))
  190.     ((| (< @-1 0x0D9A) (> @-1 0x0DC6))
  191.      (undo -1))
  192.     (1
  193.      (shift join-state))))
  194.   (backspace
  195.    (undo)))
  196.  
  197.  (join-state
  198.   (t
  199.    (mark p))
  200.   (independent
  201.    (move p)
  202.    (set c @-1)
  203.    (cond
  204.     ((| (= c 0x0DD9) (= c 0x0DDB))
  205.      (delete @-)
  206.      "α╖èΓÇì"                ; 0DCA 200D
  207.      (move @>)
  208.      (insert c))
  209.     (1
  210.      "α╖èΓÇì"                ; 0DCA 200D
  211.      (move @>)))
  212.    (shift independent-state))
  213.   (backspace
  214.    (undo)))
  215.  
  216.  (kombuva-state
  217.   (t
  218.    (mark p))
  219.   (independent
  220.    (cond
  221.     ((& (= @0 0x0DD9) (= @1 0x0D91))
  222.      (delete @<)
  223.      "α╢ô"                ; 0D93
  224.      (shift independent-state))
  225.     ((& (= @0 0x0DD9) (< @2 0))
  226.      (move @0)
  227.      (delete @+)
  228.      (move @>)
  229.      "α╖Ö"                ; 0DD9
  230.      (shift independent-state))
  231.     ((& (= @0 0x0DDB) (< @2 0))
  232.      (move @0)
  233.      (delete @+)
  234.      (move @>)
  235.      "α╖¢"                ; 0DDB
  236.      (shift independent-state))
  237.     (1
  238.      (delete p)
  239.      (pushback 1)
  240.      (shift init-state))))
  241.   (kombuva
  242.    (mark p)
  243.    (cond
  244.     ((& (= @0 0x0DD9) (< @2 0))
  245.      (delete @<)
  246.      "α╖¢")                ; 0DDB
  247.     (1
  248.      (delete @-)
  249.      (pushback 1)
  250.      (shift init-state))))
  251.   (dependent
  252.    (mark p))
  253.   (backspace
  254.    (undo))))
  255.  
  256. ;; Local Variables:
  257. ;; coding: utf-8
  258. ;; mode: emacs-lisp
  259. ;; End:
  260.